home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: EU.net!sun4nl!hguijt
- From: hguijt@inter.NL.net (Hans Guijt)
- Subject: Re: Border Scrollers
- Message-ID: <DL5tC1.Kx1@inter.NL.net>
- Organization: NLnet
- X-Newsreader: TIN [version 1.2 PL2]
- Date: Sun, 14 Jan 1996 07:12:00 GMT
-
-
- >> How do you get Gadtools Scroller type gadgets to appear in a windows
- >> border?
- >> [...]
- >> The effect I'm looking for appears in loads of different programs (e.g.
- >> WorkBench, KingCon, Multiview etc)...
- >
- >The scroller gadgets in a window's borders are not sort of GadTools, but
- >BOOPSI objects. As I know there is no way to put GadTools gadgets into the
- >parts of a window which are 'reserved' by the system. Try using BOOPSI
- >instead...
- >
- >Does anyone have a different opinion?
-
- Yeah, in the good old times (assumes a creaky voice) when there was no
- gadtools or intuition we used to program scrollers using only
- intuition.library! Try this:
-
- (sorry, I just lifted it out of a much bigger source. Use your imagination
- for types etc. If anyone here is interested I could make a more detailed
- posting)
-
- GadInfo->Flags = AUTOKNOB | FREEVERT | PROPNEWLOOK | PROPBORDERLESS;
- GadInfo->HorizPot = 0;
- GadInfo->VertPot = 0;
- GadInfo->HorizBody = MAXBODY;
- GadInfo->VertBody = MAXBODY;
-
- Gad->LeftEdge = -Window->BorderRight + 4;
- Gad->TopEdge = Window->BorderTop + 1;
- Gad->Width = Window->BorderRight - 6;
- Gad->Height = -Window->BorderTop - 12;
-
- Gad->Flags = GFLG_RELRIGHT | GFLG_RELHEIGHT;
- Gad->Activation = GACT_FOLLOWMOUSE | GACT_RELVERIFY | GACT_IMMEDIATE | GACT_RIGHTBORDER;
- Gad->GadgetType = GTYP_PROPGADGET;
- Gad->GadgetRender = (APTR)GadImage;
- Gad->SpecialInfo = (APTR)GadInfo;
- Gad->GadgetID = GadID;
- Gad->NextGadget = NULL;
-
- AddGadget (Window, Gad, -1);
-
- This gives a gadget a scrolling gadget in the right border that looks the
- same as the gadgets used by workbench, kingcon, ttx, etc.
-
-
- Bye,
-
- Hans
-
-
-